class UserType < ActiveRecord::Base
  ADMINISTRATOR = {:id => 1, :name => "administrator"}
  AUTHOR = {:id => 2, :name => "author"}
  TEACHER = {:id => 3, :name => "teacher"}
  STUDENT = {:id => 4, :name => "student"}

  def to_s
    name
  end

  def self.options
    find_all.inject([]) {|result, i| result.push([i.name, i.id])}
  end
end